package com.hp.siminterface.webservice.impl;

import java.util.List;

import com.hp.siminterface.domain.Fans;
import com.hp.siminterface.persistence.FansMapper;
import com.hp.siminterface.webservice.FansService;

public class FansServiceImpl implements FansService {
	private FansMapper fansMapper;

	@Override
	public Fans[] getFansInfo() {
		List<Fans> fans = fansMapper.selectFans();
		Fans[] fanArray = new Fans[fans.size()];
		int i = 0;
		for (Fans fan : fans) {
			fanArray[i] = fan;
			i++;
		}
		return fanArray;
	}

	public void setFansMapper(FansMapper fansMapper) {
		this.fansMapper = fansMapper;
	}

}
